toy with

.
Amuse oneself idly with, trifle, as in He teased her, toying with her as a cat toys with a mouse. [ Early 1500s ]
.
Treat casually or without seriousness, as in I'm toying with the idea of writing a novel. [ Early 1800s ]